Next | Prev | Up | Top | Contents | Index

Using scsi_info()

Before a SCSI driver tries to access a device, it must call the host adapter scsi_info() function. This function issues an Inquiry command to the specified adapter, target, and logical unit. If the Inquiry is not successful--or if the adapter, target, or LUN is invalid--the return value is NULL. Otherwise, the return value is a pointer to a scsi_target_info structure.

The SCSI driver can learn the following things from a call to scsi_info():

You can also call scsi_info() at other times; some of the returned information can be useful in error recovery. However, be aware that scsi_info() for some host adapters is slow, and can use serialized access to hardware.


Next | Prev | Up | Top | Contents | Index